home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 2.iso
/
dist
/
fw_glimpse.idb
/
usr
/
freeware
/
src
/
glimpse-3.0
/
agrep
/
main.c.z
/
main.c
Wrap
C/C++ Source or Header
|
1997-09-09
|
899b
|
37 lines
/* Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved. */
#include <stdio.h>
#include "agrep.h"
#if ISO_CHAR_SET
#include <locale.h> /* support for 8bit character set: ew@senate.be */
#endif
#if MEASURE_TIMES
extern int INFILTER_ms, OUTFILTER_ms, FILTERALGO_ms;
#endif /*MEASURE_TIMES*/
extern char Pattern[MAXPAT];
extern int EXITONERROR;
int
main(argc, argv)
int argc;
char *argv[];
{
int ret;
EXITONERROR = 1; /* the only place where it is set to 1 */
ret = fileagrep(argc, argv, 0, stdout);
#if ISO_CHAR_SET
setlocale(LC_ALL,""); /* support for 8bit character set: ew@senate.be, Henrik.Martin@eua.ericsson.se */
#endif
#if MEASURE_TIMES
fprintf(stderr, "ret = %d infilter = %d ms\toutfilter = %d ms\tfilteralgo = %d ms\n", ret, INFILTER_ms, OUTFILTER_ms, FILTERALGO_ms);
#endif /*MEASURE_TIMES*/
if(ret<0) exit(2);
if(ret==0) exit(1);
exit(0);
}